package com.gravata.enigma;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public class Confirm extends AlertDialog.Builder{

	public Confirm(Context context,String titulo,String mensagem,DialogInterface.OnClickListener positiveClickListener ,DialogInterface.OnClickListener negativeClickListener) {
		super(context);

		setTitle(titulo);
		setMessage(mensagem);
		setCancelable(false);
		if(positiveClickListener!=null)
			setPositiveButton(R.string.sim, positiveClickListener);
		if(negativeClickListener!=null)
			setNegativeButton(R.string.nao, negativeClickListener);

		create();
	}

	@Override
	public AlertDialog show() {
		return super.show();
	}

}
